home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / utmisc1 / agbst081.lha / AgaBoost0.81 / AgaBoost.doc next >
Text File  |  1995-11-18  |  12KB  |  363 lines

  1.                 *** AgaBoost 0.81 ***
  2.  
  3.            by Dennis Arkeryd (1996-05-04).
  4.  
  5. DESCRIPTION
  6. -----------
  7.  
  8. External video driver for Shapeshifter and AGA amigas. The fastest one. Doesn't need mmu.
  9.  
  10.  
  11.  
  12. DISCLAMER
  13. ---------
  14.  
  15.  The author assumes no responsibility or liability whatsoever for any damage or dataloss 
  16.  caused by using any version of the AgaBoost driver or any file in this package.
  17.  
  18.  
  19.  
  20. WHATEVER YOU DO READ THIS  (feel welcome to skip the rest)
  21. -------------------------
  22.  
  23.  This is version 0.81, ONLY the 256COLOR mode is supported.
  24.  
  25.  Use the AMIGA MOUSE POINTER option.
  26.  
  27.  ONLY USE 70nS SCREENMODES (for example pal hires laced, ntsc hires laced, euro36 hires laced).
  28.      ( The driver will ofcourse work with 35ns modes, but it will be very slow.
  29.        This is nothing specific for this driver. It is due to that almost all of the chipmem bandwith 
  30.        is needed for the monitor beam refresh )
  31.  
  32.  With 70nS screenmodes REFRESH settings 3 or 2 are recommended with a 25mhz 68030 or faster machine.
  33.  With 70nS screenmodes REFRESH setting 2 is recommended with a 40mhz 68030 or faster machine.
  34.      ( there is not much point using setting 1 )
  35.  
  36.  Use the version of the driver with the SAME "_refresh" EXTENSION AS THE REFRESH SETTING you are using.
  37.  
  38.  You will notice that the driver somtimes MISSES TO CONVERT A FEW pixels, but that after up to 
  39.  a few seconds a SWEEP GOING FROM LEFT TO RIGHT corrects it.
  40.  This is because the driver is developed to work WITHOUT MMU and still have FASTEST POSSIBLE SPEED.
  41.      ( explained in technical section )
  42.  
  43.  
  44.  
  45. DISTRIBUTION
  46. ------------
  47.  
  48.  AgaBoost is freeware. Do whatever you like with it.
  49.  
  50.  
  51.  
  52. REQUIREMENTS
  53. ------------
  54.  
  55.  AGA chipset amiga. Kickstart3.0+.
  56.  68020+CPU, mmu is NOT required.
  57.  Fastram.
  58.  ShapeShifter 3.2+ (ShapeShifter 3.1 had a bug in RTYPE_CUSTOM refresh).
  59.  
  60.  
  61.  
  62. INSTALLATION
  63. ------------
  64.  
  65.  Put the video driver file "AgaBoost" in any dir you like (eg. your shapeshifter dir/Video Drivers).
  66.  
  67.  
  68.  
  69. USAGE
  70. -----
  71.  
  72.  Go to the "Graphics" settings menu.
  73.  
  74.  A) Select "Screen type" as "External".
  75.  
  76.  B) Select the file AgaBoost in the "External driver" string gadget.
  77.  
  78.  
  79.  C) Set "Refresh rate" to an apropriate value and use the version of the driver 
  80.     with the SAME FILENAME EXTENSION AS THE SETTING you are using.
  81.  
  82.     Recommendations when using a 70ns display mode:
  83.  
  84.       With a 40 MHZ 68030 or faster I recommend REFRESH DELAY 2.
  85.       (this driver was developed on an a1200/ec030-40mhz)
  86.  
  87.       With slower machines down to a 25MHZ 68030 I think REFRESH DELAY 3 and maybe 2 will do good.
  88.       (note: The CPU-board's fast_ram_access_speed is as important as the cpu frequency)
  89.      
  90.       With a 14MHZ 68020. Go to sleep or something... :-)
  91.  
  92.  
  93.     When using a 35ns display mode:
  94.  
  95.       DON'T DO IT. This driver is in figures significantly faster than Shapeshifter's "Amiga Bitplanes" & "Amiga-Aga-Evd",
  96.                    but still damn boring slow...
  97.  
  98.       This is because almost all the chipmem bandwith is needed for the monitor beam refresh.
  99.       (It's the same phenomen as running the workbench on an ecs machine in hires and 16 colors)
  100.  
  101.  
  102.  D) Select an apropriate "display mode".
  103.  
  104.      This paragraph has nothing specific to do with my driver,
  105.      the only reason that it is here is to (once again) point that only 70ns display modes are worth 
  106.      using with 256 colors. The graphics refresh will feel like PC TASK with a 35ns mode in 256 colors.
  107.  
  108.      Pal Hires Laced, Ntsc Hires Laced, Euro36 Hires Laced are 70 ns modes.
  109.      I recommend the EURO36 for your eyes (can also be used on 15khz monitors with the "15khz hack").
  110.  
  111.  
  112.  
  113. MEMORY USAGE
  114. ------------
  115.  
  116.  The driver uses the XScreenSize*YScreenSize bytes of fastram for the mac display memory.
  117.  It additionally needs around 150k of fastram, most of it used by a table for the cpu c2p pass.
  118.  
  119.  It uses 2*XScreenSize*YScreenSize bytes of chipram for storing the amiga display memory and a 
  120.  "half planar" buffer. This "half planar" buffer doesn't need at all to be that big and
  121.  will be made minimal in next version.
  122.  
  123.  Compared with "Amiga AGA Evd" this driver uses more chipram, but less fastram which means
  124.  you get a little bit more mac memory to play with.
  125.  
  126.  
  127.  
  128. SPEED
  129. -----
  130.  
  131. Here are some comparisons between "AgaBoost", "Amiga AGA Evd" and "Shapshifter Amiga bitplanes",
  132. all tests with refresh setting 2 and 256 colors.
  133.  
  134.  
  135. Computer               Screenmode                 
  136. a1200/blizzard1230-I/ec030-40mhz | Euro36 hires laced 640*400 70ns.
  137.  
  138. Tested                      Time (stopwatch method)
  139.                             Shapeshifter bitplanes | Amiga AGA Evd | AgaBoost
  140.  
  141. Wolf3d demo 320*200,        24.05                    21.85           15.45 ((quite well playable))
  142. walktest.
  143. MacAnimViewer,              10.25                    9.30            6.35
  144. yellyfish.fli five rounds.
  145.  
  146. Note: The test values for Shapeshifter bitplanes are quite irrelevant in this non mmu test, due to that
  147. (*)   it converts all of the display all the time, the number of refreshes/second is much lower than
  148.       the other cases. The reason all of the cpu time doesn't get eaten by the refresh routine is 
  149.       probably due to blitter waiting.
  150.       (let's say that the display is made of regions 1,2,3,4 and that all routines are equally fast.
  151.        If for instance only region 4 gets changed, then "Shapeshifter bitplanes"
  152.        changes 1,2,3,4 during time T while the other ones change 4,4,4,4)
  153.  
  154.  
  155. Computer               Screenmode                 
  156. a1200/blizzard1230-I/ec030-40mhz | Euro36 SuperHires 1280*256 35ns.
  157.  
  158. Tested                      Time (stopwatch method)
  159.                             Shapeshifter bitplanes | Amiga AGA Evd | AgaBoost
  160.  
  161. MacAnimViewer,              18.75                    16.95           11.95
  162. yellyfish.fli five rounds
  163.  
  164. Note: The test values for Shapeshifter bitplanes are quite irrelevant, see (*).
  165.  
  166.  
  167. Computer               Screenmode                 
  168. a1200/blizzard1230-I/ec030-40mhz | Euro36 SuperHires Laced 1280*400 35ns.
  169.  
  170. Tested                      Time (stopwatch method)
  171.                             Shapeshifter bitplanes | Amiga AGA Evd | AgaBoost
  172.  
  173. Wolf3d demo, 320*200,       53.00                    44.70           26.80
  174. walktest.
  175.  
  176. Note: The test values for Shapeshifter bitplanes are quite irrelevant, see (*).
  177.  
  178.  
  179.  Without getting the [cpu converted frames / s] values for "Shapeshifter bitplanes" and "Amiga AGA Evd"
  180.  I simply don't know the exact speed relations.
  181.  However, by the test results I think it would be a safe guess that AgaBoost is at least twice
  182.  as fast as "Amiga Aga Evd".
  183.  
  184.  
  185.  Note that due to the blitter pass the maximum throughput speed with AgaBoost will be
  186.  320*216 at a 25fps rate ~=1.728mb/s.
  187.  But I don't think you will use bigger windows for (graphics intensive) game & animation playing.
  188.  
  189.  Note also that the maxiumum amount of memory the cpu can move to chipram is only a few times
  190.  higher than that, so for instance having a 640*480 25fps cpu_only conversion routine would mean
  191.  that almost all or more than all :-) of the cpu time would go to chipmem data shuffling.
  192.  
  193.  
  194.  At last note that tests with Macintosh graphics speed test programs like "speedometer" 
  195.  DOES NOT produce correct results with AgaBoost, nor any other driver using the blitter
  196.  (either it is an active part of c2p or because of using super-bitmap-windows).
  197.  
  198.  
  199.  
  200. TECHNICAL STUFF (very rough text)
  201. ---------------------------------
  202.  
  203.  C2P TECHNIQUE
  204.  -------------
  205.  AgaBoost uses a 2 pass c2p technique. One cpu pass and one blitter pass.
  206.  
  207.  In the "for the eye best looking" version 8pixels can be converted with 8 instructions,
  208.  using a 2mb table.
  209.  A faster version (on a 030) will use the following 12 instructions and a 2 meg table:
  210.  
  211.     movem.w (a0)+,d0-d3
  212.      movem.l (a1,d0.w*8),d4-d5
  213.      lea (a2,d1.w*8),a6
  214.      or.l (a6)+,d4
  215.      or.l (a6)+,d5
  216.      lea (a3,d2.w*8),a6
  217.      or.l (a6)+,d4
  218.      or.l (a6)+,d5
  219.      lea (a4,d3.w*8),a6
  220.      or.l (a6)+,d4
  221.      or.l (a6)+,d5
  222.    movem.l d4-d5,-(a5)
  223.  
  224.  (a similiar source called "blitscreen" or something can be found on aminet)
  225.  
  226.  The data will be converted like this:
  227.  
  228.  Chunky:
  229.  01234567 01234567 01234567 01234567 01234567 01234567 01234567 01234567
  230.  
  231.  After cpu pass:
  232.  00000000 11111111 22222222 33333333 44444444 55555555 66666666 77777777 ...
  233.  (I call this mode "half planar")
  234.  
  235.  
  236.  After blitter pass:
  237.  Normal planar mode  (( one row 0, one row 1 and so on )) 
  238.  
  239.  
  240.  This program does not work exactly that way though. By taking use of "free cycles" the cpu pass
  241.  does some more work at a minimum time cost which makes the blitter able two convert around 25% more, 
  242.  ugly flickering is avoided and much less blitter settings are needed.
  243.  It also only uses a 128kb table instead of a 2meg one.
  244.  
  245.  In this version the halfplanar data eats as much chipram as the mac display,
  246.  but it doesn't need at all to be that big and will be made minimal in next version.
  247.  
  248.  
  249.  
  250.  CHANGE NOTICING TECHNIQUE
  251.  -------------------------
  252.  
  253.  AgaBoost is created to work with machines without mmu, therefore it uses a "delta buffer" technique
  254.  (like "Amiga Aga Evd"). But the classical deltabuffer checking where every pixel get's checked
  255.  (if it has been changed since the last refresh) at every refresh takes a lot of cpu time.
  256.  
  257.  Therefore this driver uses 2 methods to minimize the deltacheck time:
  258.  
  259.  METHOD 1:
  260.    Only 43.75% of the pixels in each block are checked (in longword checks) .
  261.    (each block is 16*8pixels)
  262.    Due to this changes are MISSED sometimes, which you WILL NOTICE.
  263.    To avoid permanent losses a "windscreen wiper" function is added
  264.    (the rate of this is lowered on heavy graphics load).
  265.  
  266.  METHOD 2:
  267.    Blocks which haven't been changed in 3 seconds
  268.    will during low graphics load get checked between:
  269.      every 4th and every 2nd refresh depending on which _refresh extension of the driver you are using.
  270.    and during high graphics load:
  271.      twice a second when using the driver with correct _refresh extension.
  272.  
  273.    This method will give a limited "slow on reactions effect", but will be very little disturbing
  274.    as long as you use AMIGA MOUSE POINTER option.
  275.    
  276.  Method 2 makes method1 somwhat obsolete. Maybe I'll release an all pixel checking version.
  277.  
  278.  
  279.  Last but not least. The deltabuffer for this driver does not like some others eat as much fastmem 
  280.  as the mac display. This driver uses a "hash function" instead, and therefore it only needs to
  281.  store one longword/block (16*8 pixels).
  282.  
  283.  
  284.  
  285. OTHER NOTES
  286. -----------
  287.  
  288.  The code is mainly written according to C.Bauer's guidelines, storing its variables in a "context" structure.
  289.  However, it will not give more than one screen if used with a possible future implementation of
  290.  Shapeshifter allowing multiple screens.
  291.  When and if that gets implemented I will ofcourse release a version of AgaBoost that gives that.
  292.  ( if not the amiga bitplane refresh mode gets significantly improved :-) )
  293.  
  294.  
  295.  
  296. HISTORY
  297. -------
  298.  
  299. v0.8  (1996-05-04) : Initial release.
  300. v0.81 (1996-05-04) : "Wiper function" set according to refresh, in v0.8 the time before correcting
  301.                      a "miss" was longer than intended in refresh3-5 versions.
  302.                      (as only about 4 hours has passed between I hope not so many people have downloaded v0.8)
  303.  
  304.  
  305.  
  306. 2 DO
  307. ----
  308.  
  309.  Implementation of 4bit mode
  310.  ( yes, it would be twice as fast (both cpu&blitter pass), but 16 times as boring I think ;-) ).
  311.  
  312.  Reduce usage (or waste) of chipmem ("half planar" buffer).
  313.  
  314.  One file instead of different "_refresh" versions.
  315.  (Shapeshifter doesn't currently provide the refresh value to the driver so currently you'd
  316.   have to do your own mesaurement counting the time between a certain number of phoney refreshes)
  317.  
  318.  040 optimized version if it gives more speed.
  319.  
  320.  MMU version.
  321.  (I'll sure implement the two last ones as I got hold of a lovely A4000/040 this week :--) )
  322.  
  323.  
  324.  
  325.  
  326. MAYBE 2 DO
  327. ----------
  328.  
  329.  Feel welcome to mail me if any of following sounds interesting or if you have any own ideas.
  330.  
  331.    256->64 and 256->32 dithered modes.
  332.    (would be as fast as 256, except for extreme palette setting time)
  333.    Could be used with ecs/lores or with aga/35ns for better performance.
  334.  
  335.    Screenmode swap by keypress while Shapeshifter is running.
  336.    (would require modified Shapeshifter to do it in a system friendly way though)
  337.    Nice for game playing, animation viewing.
  338.  
  339.    Amiga window version.
  340.  
  341.    All pixels delta check version.
  342.  
  343.  
  344. AUTHOR
  345. ------
  346.  
  347.  Dennis Arkeryd.
  348.  
  349.  EMAIL: z94arde@mtek.chalmers.se
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363. AMIGA KICKS ASS!